package com.scs.application.modules.dept.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.scs.application.core.entity.DataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityIndexAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;
/**
 * <p>
 * 科室需求计划明细
 * </p>
 *
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "科室需求明细表")
@TableName("dept_demand_item")
@EntityIndexAnnotation(ix={"apply_auto_id","matr_id","demand_id"})
public class DemandItem extends DataEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "外键",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String demandId;

    @EntityFieldAnnotation(
            text = "耗材ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrId;

    @EntityFieldAnnotation(
            text = "品名",
            length = "255",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrName;

    @EntityFieldAnnotation(
            text = "品规",
            length = "255",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrSpec;

    @EntityFieldAnnotation(
            text = "包装单位",
            length = "255",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String packageUnit;

    @EntityFieldAnnotation(
            text = "包装数量",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double packageQty;

    @EntityFieldAnnotation(
            text = "包装比率",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double packageRate;

    @EntityFieldAnnotation(
            text = "单品单位",
            length = "10",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String skuUnit;

    @EntityFieldAnnotation(
            text = "单品数量",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double skuQty;

    @EntityFieldAnnotation(
            text = "单品单价",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double skuPrice;

    @EntityFieldAnnotation(
            text = "总价",
            type = EntityFieldType.DOUBLE,
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double amount;
    @EntityFieldAnnotation(
            text = "默认供应商ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = "默认供应商ID"
    )
    private String supplierId;

    @EntityFieldAnnotation(
            text = "默认供应商名字",
            length = "100",
            default_value = "",
            comment = "默认供应商名字"
    )
    private String supplierName;
    @EntityFieldAnnotation(
            text = "厂商ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = "厂商ID"
    )
    private String mfgId;

    @EntityFieldAnnotation(
            text = "采购订单ID",
            type = EntityFieldType.LONG,
            not_null = false,
            default_value = "",
            comment = ""
    )
    @JsonIgnore
    private String orderId;

    @EntityFieldAnnotation(
            text = "备注",
            length = "200",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remark;

    @EntityFieldAnnotation(
            text = "外部执行状态，0：未受理；-1：单个审批/集中审批完成；1：开始配送；-2：订单发送完成；:3：供应商未发货；-3：供方发货完成；4：仓库入库处理中；-4：仓库入库完成； 5：仓库开始配送；-5：仓库配送完成",
            length = "",
            not_null = true,
            default_value = "0",
            comment = " 外部处理状态"
    )
    private Integer statusProcess;


    // creator ,在父类中处理


    // gmt_create ,在父类中处理


    // modifier ,在父类中处理


    // gmt_modified ,在父类中处理

    @EntityFieldAnnotation(
            text = "dept_apply_item.id",
            type = EntityFieldType.LONG,
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String applyItemId;


    @EntityFieldAnnotation(
            text = "dept_apply_auto.id",
            type = EntityFieldType.LONG,
            not_null = false,
            default_value = "",
            comment = "自动请领id"
    )
    private String applyAutoId;

    @EntityFieldAnnotation(
            text = "耗材型号",
            length = "100",
            not_null = false,
            default_value = "",
            comment = "耗材型号"
    )
    private String matrModel;


    //包模板id
    @TableField(exist = false)
    private String packTempletId;

    //包模板明细
    @TableField(exist = false)
    private String packTempletItemId;

    //模板需要添加的耗材id ,分割
    @TableField(exist = false)
    private String packTempletMatrIds;
}
